Lungo.init({
    name:'Webapp'
});
Lungo.ready(function () {

    /**
     * 读取缓存数据
     */
    var catchCacheData = function () {
        var _cache = App.Data.Cache;
        var _customBiz = App.Biz.CustomBiz;
        _cache.customs = _customBiz.loadCustomData();
        _cache.custom_groups = _customBiz.computeCustomGroup(_cache.customs);
    };

    window.setTimeout(function () {
        App.Router.gotoArticle('home', PAGE_HOME_INFO);
    }, 1000);
    App.Binder.bindData();
    pushPageSections();
    catchCacheData();
});

var pushPageSections = function () {
    var $ = Lungo.dom;
    var sections = $('body > section');
    for (var i = 0; i < sections.length; i++) {
        var section_id = sections[i].id;
        if (section_id && section_id !== 'loading') {
            App.View.pushCachePage($('section#' + section_id));
        }
    }
};

